/*
 * Copyright (c) 2021, Arm Limited. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 *
 */

#include "mbedtls/entropy.h"
#include "tfm_plat_crypto_dummy_nv_seed.h"

/* NOTE: The seed value here is only an example, please do not use it in
 * production. Platform vendor should implement their own seed value.
 */
const unsigned char seed_value[MBEDTLS_ENTROPY_BLOCK_SIZE] = {
            0x12, 0x13, 0x23, 0x34, 0x0a, 0x05, 0x89, 0x78,
            0xa3, 0x66, 0x8c, 0x0d, 0x97, 0x55, 0x53, 0xca,
            0xb5, 0x76, 0x18, 0x62, 0x29, 0xc6, 0xb6, 0x79,
            0x75, 0xc8, 0x5a, 0x8d, 0x9e, 0x11, 0x8f, 0x85,
            0xde, 0xc4, 0x5f, 0x66, 0x21, 0x52, 0xf9, 0x39,
            0xd9, 0x77, 0x93, 0x28, 0xb0, 0x5e, 0x02, 0xfa,
            0x58, 0xb4, 0x16, 0xc8, 0x0f, 0x38, 0x91, 0xbb,
            0x28, 0x17, 0xcd, 0x8a, 0xc9, 0x53, 0x72, 0x66,
};

int tfm_plat_crypto_create_entropy_seed(void)
{
    return tfm_plat_crypto_nv_seed_write(seed_value,
                                         MBEDTLS_ENTROPY_BLOCK_SIZE);
}
